home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
strlibs.zip
/
STRNEND.C
< prev
next >
Wrap
Text File
|
1993-01-04
|
577b
|
22 lines
/* File : strnend.c
Author : Richard A. O'Keefe.
Updated: 1 June 1984
Defines: strnend()
strnend(src, len)
returns a pointer to just after the end of the string src, which is
terminated by a NUL character, or by exhaustion of the length bound
len. That is, strnend(s,L)-s = strnlen(s,L). s+strnlen(s,L) could
of course be used instead, but this is sometimes clearer.
*/
char *strnend(src, len)
register char *src;
register int len;
{
while (--len >= 0 && *src) src++;
return src;
}